inherited Frmtd_product_Edit: TFrmtd_product_Edit
  Left = 459
  Top = 97
  BorderIcons = [biSystemMenu, biMaximize]
  Caption = #36135#21697#36164#26009#32534#36753
  ClientHeight = 594
  ClientWidth = 902
  FormStyle = fsStayOnTop
  ExplicitWidth = 920
  ExplicitHeight = 640
  DesignSize = (
    902
    594)
  PixelsPerInch = 119
  TextHeight = 12
  object LblName: TcxLabel [0]
    Left = 15
    Top = 9
    Caption = #36135#21697#21517#31216
    ParentFont = False
    Style.Font.Charset = GB2312_CHARSET
    Style.Font.Color = clBlue
    Style.Font.Height = -12
    Style.Font.Name = #23435#20307
    Style.Font.Style = []
    Style.IsFontAssigned = True
  end
  object EdtName: TcxDBTextEdit [1]
    Left = 71
    Top = 7
    DataBinding.DataField = 'name'
    DataBinding.DataSource = MainDataSource
    TabOrder = 0
    Width = 240
  end
  object LblCode: TcxLabel [2]
    Left = 324
    Top = 9
    Caption = #36135#21697#32534#30721
    ParentFont = False
    Style.Font.Charset = GB2312_CHARSET
    Style.Font.Color = clBlue
    Style.Font.Height = -12
    Style.Font.Name = #23435#20307
    Style.Font.Style = []
    Style.IsFontAssigned = True
  end
  object EdtCode: TcxDBTextEdit [3]
    Left = 380
    Top = 7
    DataBinding.DataField = 'code'
    DataBinding.DataSource = MainDataSource
    TabOrder = 7
    Width = 160
  end
  object pgcProduct: TcxPageControl [4]
    Left = 15
    Top = 35
    Width = 870
    Height = 451
    Anchors = [akLeft, akTop, akRight, akBottom]
    TabOrder = 8
    Properties.ActivePage = tsInfo
    Properties.CustomButtons.Buttons = <>
    Properties.ShowFrame = True
    Properties.Style = 9
    LookAndFeel.Kind = lfStandard
    ClientRectBottom = 450
    ClientRectLeft = 1
    ClientRectRight = 869
    ClientRectTop = 19
    object tsInfo: TcxTabSheet
      Caption = #22522#26412#20449#24687
      Color = clBtnFace
      ImageIndex = 0
      ParentColor = False
      DesignSize = (
        868
        431)
      object pnlCustom: TPanel
        Left = 668
        Top = 0
        Width = 200
        Height = 431
        Align = alRight
        BevelOuter = bvNone
        TabOrder = 32
        Visible = False
      end
      object LblDepotKind: TcxLabel
        Left = 14
        Top = 16
        Caption = #23384#36135#31867#22411
        ParentFont = False
        Style.Font.Charset = GB2312_CHARSET
        Style.Font.Color = clBlue
        Style.Font.Height = -12
        Style.Font.Name = #23435#20307
        Style.Font.Style = []
        Style.IsFontAssigned = True
        Transparent = True
      end
      object LblCostType: TcxLabel
        Left = 246
        Top = 16
        Caption = #25104#26412#26680#31639
        ParentColor = False
        ParentFont = False
        Style.Color = clBtnFace
        Style.Font.Charset = GB2312_CHARSET
        Style.Font.Color = clBlue
        Style.Font.Height = -12
        Style.Font.Name = #23435#20307
        Style.Font.Style = []
        Style.IsFontAssigned = True
        Transparent = True
      end
      object LblKind: TcxLabel
        Left = 455
        Top = 16
        Caption = #36135#21697#23646#24615
        Transparent = True
      end
      object LblType: TcxLabel
        Left = 15
        Top = 45
        Caption = #36135#21697#31867#21035
        Transparent = True
      end
      object LblShortName: TcxLabel
        Left = 245
        Top = 45
        Caption = #31616'    '#31216
        Transparent = True
      end
      object EdtAbName: TcxDBTextEdit
        Left = 311
        Top = 43
        DataBinding.DataField = 'abname'
        DataBinding.DataSource = MainDataSource
        TabOrder = 4
        Width = 120
      end
      object LblSpec: TcxLabel
        Left = 456
        Top = 45
        Caption = #35268'    '#26684
        Transparent = True
      end
      object EdtSpec: TcxDBTextEdit
        Left = 523
        Top = 43
        DataBinding.DataField = 'spec'
        DataBinding.DataSource = MainDataSource
        TabOrder = 5
        Width = 120
      end
      object LblValidDate: TcxLabel
        Left = 14
        Top = 74
        Caption = #26377#25928#22825#25968
        Transparent = True
      end
      object EdtValidDates: TcxDBTextEdit
        Left = 81
        Top = 72
        DataBinding.DataField = 'validdates'
        DataBinding.DataSource = MainDataSource
        TabOrder = 6
        OnKeyPress = EdtValidDatesKeyPress
        Width = 120
      end
      object ChkBatch: TcxDBCheckBox
        Left = 12
        Top = 154
        Caption = #25209#21495#31649#29702
        DataBinding.DataField = 'batch'
        DataBinding.DataSource = MainDataSource
        Enabled = False
        Properties.Alignment = taRightJustify
        Properties.NullStyle = nssUnchecked
        TabOrder = 7
        Transparent = True
      end
      object EdtDepotKindId: TcxDBLookupComboBox
        Tag = 20
        Left = 81
        Top = 14
        DataBinding.DataField = 'depotkindid'
        DataBinding.DataSource = MainDataSource
        Properties.ImmediatePost = True
        Properties.ListColumns = <>
        Properties.ListOptions.SyncMode = True
        Properties.OnInitPopup = EdtDepotKindIdPropertiesInitPopup
        TabOrder = 0
        Width = 120
      end
      object EdtCalcCost: TcxDBLookupComboBox
        Tag = 22
        Left = 311
        Top = 14
        DataBinding.DataField = 'CalcCost'
        DataBinding.DataSource = MainDataSource
        Properties.ImmediatePost = True
        Properties.ListColumns = <>
        Properties.ListOptions.SyncMode = True
        TabOrder = 1
        Width = 120
      end
      object cxCbbKind: TcxDBLookupComboBox
        Tag = 25
        Left = 523
        Top = 14
        DataBinding.DataField = 'kind'
        DataBinding.DataSource = MainDataSource
        Properties.CaseSensitiveSearch = True
        Properties.DropDownAutoSize = True
        Properties.DropDownSizeable = True
        Properties.GridMode = True
        Properties.ImmediatePost = True
        Properties.IncrementalFiltering = False
        Properties.ListColumns = <>
        Properties.ListOptions.SyncMode = True
        Properties.PostPopupValueOnTab = True
        Properties.OnInitPopup = cxCbbKindPropertiesInitPopup
        TabOrder = 2
        Width = 120
      end
      object lblwarndays: TcxLabel
        Left = 210
        Top = 74
        Caption = #26377#25928#26399#39044#35686#22825#25968
        Transparent = True
      end
      object edtwarndays: TcxDBTextEdit
        Left = 311
        Top = 72
        DataBinding.DataField = 'warndays'
        DataBinding.DataSource = MainDataSource
        TabOrder = 8
        OnKeyPress = EdtValidDatesKeyPress
        Width = 120
      end
      object lblProducttrademarkid: TcxLabel
        Left = 456
        Top = 74
        Caption = #21697'    '#29260
        Transparent = True
      end
      object edtProducttrademarkid: TcxDBLookupComboBox
        Tag = 42
        Left = 523
        Top = 72
        DataBinding.DataField = 'producttrademarkid'
        DataBinding.DataSource = MainDataSource
        Properties.ListColumns = <>
        TabOrder = 9
        Width = 120
      end
      object dynedtImei: TcxDBCheckBox
        Left = 12
        Top = 180
        Caption = #30005#23376#20018#21495
        DataBinding.DataField = 'imei'
        DataBinding.DataSource = MainDataSource
        Properties.Alignment = taRightJustify
        Properties.NullStyle = nssUnchecked
        TabOrder = 10
        Transparent = True
      end
      object edtProductType: TcxDBLookupComboBox
        Tag = 32
        Left = 81
        Top = 43
        DataBinding.DataField = 'producttypeid'
        DataBinding.DataSource = MainDataSource
        Properties.ListColumns = <>
        TabOrder = 3
        Width = 120
      end
      object grpMeasure: TcxGroupBox
        Left = 120
        Top = 149
        Caption = #24230#37327#21333#20301
        TabOrder = 11
        Height = 51
        Width = 478
        object chkLength: TcxDBCheckBox
          Left = 33
          Top = 22
          Caption = #38271
          DataBinding.DataField = 'length'
          DataBinding.DataSource = MainDataSource
          Properties.ImmediatePost = True
          Properties.NullStyle = nssUnchecked
          Properties.OnValidate = chkLengthPropertiesValidate
          TabOrder = 0
          Transparent = True
        end
        object chkWidth: TcxDBCheckBox
          Left = 107
          Top = 22
          Caption = #23485
          DataBinding.DataField = 'width'
          DataBinding.DataSource = MainDataSource
          Properties.ImmediatePost = True
          Properties.NullStyle = nssUnchecked
          Properties.OnValidate = chkLengthPropertiesValidate
          TabOrder = 1
          Transparent = True
        end
        object chkHeight: TcxDBCheckBox
          Left = 180
          Top = 22
          Caption = #39640'/'#21402
          DataBinding.DataField = 'height'
          DataBinding.DataSource = MainDataSource
          Properties.ImmediatePost = True
          Properties.NullStyle = nssUnchecked
          Properties.OnValidate = chkLengthPropertiesValidate
          TabOrder = 2
          Transparent = True
        end
        object edtSpecificweight: TcxDBCalcEdit
          Left = 328
          Top = 22
          DataBinding.DataField = 'specificweight'
          DataBinding.DataSource = MainDataSource
          Properties.ImmediatePost = True
          TabOrder = 3
          Width = 121
        end
        object lblSpecificweight: TcxLabel
          Left = 292
          Top = 24
          Caption = #27604#37325
          Transparent = True
        end
        object edtAssUnit: TcxComboBox
          Left = 328
          Top = -1
          Properties.ImmediatePost = True
          Properties.OnValidate = edtAssUnitPropertiesValidate
          TabOrder = 5
          Width = 121
        end
        object cxLabel8: TcxLabel
          Left = 268
          Top = -2
          Caption = #36741#21161#21333#20301
        end
      end
      object LblYW: TcxLabel
        Left = 8
        Top = 203
        Caption = #19994#21153#21333#20301#65306
        ParentFont = False
        Style.Font.Charset = GB2312_CHARSET
        Style.Font.Color = clBlue
        Style.Font.Height = -12
        Style.Font.Name = #23435#20307
        Style.Font.Style = []
        Style.IsFontAssigned = True
        Transparent = True
      end
      object btnUnitGroup: TcxButton
        Left = 537
        Top = 201
        Width = 100
        Height = 23
        Caption = #36873#25321#21333#20301#32452
        TabOrder = 12
        OnClick = btnUnitGroupClick
      end
      object LblYWMemo: TcxLabel
        Left = 78
        Top = 201
        AutoSize = False
        Height = 16
        Width = 254
      end
      object cxLabel1: TcxLabel
        Left = 7
        Top = 391
        Anchors = [akLeft, akBottom]
        Caption = #36741#21161#21333#20301#65306
        Transparent = True
      end
      object EdtCUnit: TcxTextEdit
        Left = 224
        Top = 389
        Anchors = [akLeft, akBottom]
        Properties.OnValidate = EdtCUnitPropertiesValidate
        TabOrder = 13
        Text = '0'
        OnKeyPress = EdtCUnitKeyPress
        Width = 121
      end
      object EdtFUnit: TcxTextEdit
        Left = 77
        Top = 389
        Anchors = [akLeft, akBottom]
        Properties.OnValidate = EdtFUnitPropertiesValidate
        TabOrder = 14
        Width = 121
      end
      object LblEqual: TcxLabel
        Left = 204
        Top = 391
        Anchors = [akLeft, akBottom]
        Caption = #65309
        Transparent = True
      end
      object GrdUnitPrice: TcxGrid
        Left = 3
        Top = 225
        Width = 862
        Height = 161
        Hint = #22810#21333#20301#26102#21333#20301#27604#29575#20174#22823#21040#23567#36755#20837#12290#20363#22914' '#31665#65306'50 '#26465#65306'1 '#21253'0.1'#65292#27604#29575'1'#20026#22522#26412#21333#20301
        Anchors = [akLeft, akTop, akRight, akBottom]
        PopupMenu = popUnitPrice
        TabOrder = 15
        object viewUnit: TcxGridDBTableView
          OnMouseDown = viewUnitMouseDown
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = DS_UnitPirce
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.FocusCellOnTab = True
          OptionsBehavior.FocusFirstCellOnNewRecord = True
          OptionsBehavior.GoToNextCellOnEnter = True
          OptionsBehavior.FocusCellOnCycle = True
          OptionsData.Appending = True
          OptionsView.NoDataToDisplayInfoText = #22810#21333#20301#26102#21333#20301#27604#29575#20174#22823#21040#23567#36755#20837#12290#20363#22914' '#31665#65306'50 '#26465#65306'1 '#21253'0.1'#65292#27604#29575'1'#20026#22522#26412#21333#20301
          OptionsView.ShowEditButtons = gsebAlways
          OptionsView.GroupByBox = False
          OptionsView.Indicator = True
          OptionsView.IndicatorWidth = 25
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          OnCustomDrawIndicatorCell = viewUnitCustomDrawIndicatorCell
          object baseunit: TcxGridDBColumn
            Caption = #22522#26412#21333#20301
            DataBinding.FieldName = 'baseunit'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ImmediatePost = True
            Properties.NullStyle = nssUnchecked
            Width = 55
          end
          object unitname: TcxGridDBColumn
            Caption = #21333#20301#21517#31216
            DataBinding.FieldName = 'unitname'
            PropertiesClassName = 'TcxComboBoxProperties'
            Properties.ImmediatePost = True
            Properties.IncrementalSearch = False
            Properties.OnValidate = unitnamePropertiesValidate
            Width = 55
          end
          object rate: TcxGridDBColumn
            Caption = #21333#20301#27604#29575
            DataBinding.FieldName = 'rate'
            Width = 60
          end
          object colfixrate: TcxGridDBColumn
            Caption = #22266#23450#27604#29575
            DataBinding.FieldName = 'fixrate'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Width = 50
          end
          object purreprice: TcxGridDBColumn
            Caption = #21442#32771#36827#20215
            DataBinding.FieldName = 'purreprice'
            Width = 60
          end
          object salereprice: TcxGridDBColumn
            Caption = #21442#32771#21806#20215
            DataBinding.FieldName = 'salereprice'
            Width = 60
          end
          object barcode: TcxGridDBColumn
            Caption = #26465#30721
            DataBinding.FieldName = 'barcode'
            Width = 110
          end
          object wtcode: TcxGridDBColumn
            Caption = #31216#37325#30721
            DataBinding.FieldName = 'wtcode'
            Width = 110
          end
          object purtopprice: TcxGridDBColumn
            Caption = #26368#39640#36827#20215
            DataBinding.FieldName = 'purtopprice'
            Width = 60
          end
          object salelowprice: TcxGridDBColumn
            Caption = #26368#20302#21806#20215
            DataBinding.FieldName = 'salelowprice'
            Width = 60
          end
          object vipprice: TcxGridDBColumn
            Caption = #20250#21592#20215
            DataBinding.FieldName = 'vipprice'
            Width = 60
          end
          object price1: TcxGridDBColumn
            Caption = #19968#32423#25209#21457#20215
            DataBinding.FieldName = 'price1'
            Width = 65
          end
          object price2: TcxGridDBColumn
            Caption = #20108#32423#25209#21457#20215
            DataBinding.FieldName = 'price2'
            Width = 65
          end
          object price3: TcxGridDBColumn
            Caption = #19977#32423#25209#21457#20215
            DataBinding.FieldName = 'price3'
            Width = 65
          end
          object price4: TcxGridDBColumn
            Caption = #22235#32423#25209#21457#20215
            DataBinding.FieldName = 'price4'
            Width = 65
          end
          object price5: TcxGridDBColumn
            Caption = #20116#32423#25209#21457#20215
            DataBinding.FieldName = 'price5'
            Width = 65
          end
          object sale: TcxGridDBColumn
            Caption = #38144#21806#32570#30465#21333#20301
            DataBinding.FieldName = 'sale'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ImmediatePost = True
            Properties.NullStyle = nssUnchecked
            Width = 75
          end
          object pur: TcxGridDBColumn
            Caption = #37319#36141#32570#30465#21333#20301
            DataBinding.FieldName = 'pur'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ImmediatePost = True
            Properties.NullStyle = nssUnchecked
            Width = 75
          end
          object depot: TcxGridDBColumn
            Caption = #20179#24211#32570#30465#21333#20301
            DataBinding.FieldName = 'depot'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ImmediatePost = True
            Properties.NullStyle = nssUnchecked
            Width = 75
          end
        end
        object GrdUnitPriceLevel1: TcxGridLevel
          GridView = viewUnit
        end
      end
      object LblMemo: TcxLabel
        Left = 2
        Top = 411
        Anchors = [akLeft, akBottom]
        AutoSize = False
        Caption = '('#27880#65306#36741#21161#21333#20301#19982#22522#26412#21333#20301#30340#27604#29575#35774#32622#21482#26159#26041#20415#21333#25454#24405#20837#26102#33258#21160#35745#31639#36741#21161#21333#20301#30340#25968#37327#12290#27492#39033#21487#20197#20026#31354#12290')'
        Transparent = True
        Height = 18
        Width = 523
      end
      object LblUnit: TcxLabel
        Left = 354
        Top = 341
        AutoSize = False
        Caption = #36741#21161#21333#20301#27604#29575
        Height = 16
        Width = 88
      end
      object btnCustom: TcxButton
        Left = 660
        Top = 0
        Width = 40
        Height = 100
        Caption = #33258#23450#20041'>>'
        TabOrder = 16
        Font.Charset = GB2312_CHARSET
        Font.Color = clWindowText
        Font.Height = -12
        Font.Name = #23435#20307
        Font.Style = []
        ParentFont = False
        WordWrap = True
        OnClick = btnCustomClick
      end
      object sptCustom: TcxSplitter
        Left = 660
        Top = 0
        Width = 8
        Height = 431
        HotZoneClassName = 'TcxSimpleStyle'
        AlignSplitter = salRight
        Control = pnlCustom
        OnMoved = sptCustomMoved
        Visible = False
      end
      object dynlblScoreRate: TcxLabel
        Left = 13
        Top = 101
        Caption = #31215#20998#27604#29575
        Transparent = True
      end
      object dynedtScoreRate: TcxDBSpinEdit
        Left = 80
        Top = 100
        DataBinding.DataField = 'scorerate'
        DataBinding.DataSource = MainDataSource
        Properties.DisplayFormat = '0.0000'
        Properties.EditFormat = '0.0000'
        Properties.ImmediatePost = True
        Properties.ValueType = vtFloat
        TabOrder = 35
        Width = 121
      end
      object dynlblScoreExch: TcxLabel
        Left = 243
        Top = 101
        Caption = #20817#22870#31215#20998
        Transparent = True
      end
      object dynedtScoreExch: TcxDBSpinEdit
        Left = 311
        Top = 100
        DataBinding.DataField = 'scoreexch'
        DataBinding.DataSource = MainDataSource
        Properties.DisplayFormat = '0.0000'
        Properties.EditFormat = '0.0000'
        Properties.ImmediatePost = True
        Properties.ValueType = vtFloat
        TabOrder = 37
        Width = 121
      end
    end
    object tsStore: TcxTabSheet
      Caption = #23384#36135#20449#24687
      ImageIndex = 2
      OnShow = tsStoreShow
      object cxLabel2: TcxLabel
        Left = 13
        Top = 15
        Caption = #40664#35748#20179#24211#65306
        Transparent = True
      end
      object GrdProductDepot: TcxGrid
        Left = 0
        Top = 62
        Width = 868
        Height = 369
        Align = alBottom
        Anchors = [akLeft, akTop, akRight, akBottom]
        TabOrder = 2
        object viewDepot: TcxGridDBTableView
          OnMouseDown = viewDepotMouseDown
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = dsDS_book
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsData.Appending = True
          OptionsView.GroupByBox = False
          OptionsView.Indicator = True
          OptionsView.IndicatorWidth = 25
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          OnCustomDrawIndicatorCell = viewUnitCustomDrawIndicatorCell
          object _DepotName: TcxGridDBColumn
            Caption = #20179#24211#21517#31216
            DataBinding.FieldName = 'DepotId'
            PropertiesClassName = 'TcxLookupComboBoxProperties'
            Properties.ListColumns = <>
            Width = 85
          end
          object downqty: TcxGridDBColumn
            Caption = #24211#23384#19979#38480
            DataBinding.FieldName = 'lowqty'
            Width = 80
          end
          object topqty: TcxGridDBColumn
            Caption = #24211#23384#19978#38480
            DataBinding.FieldName = 'topqty'
            Width = 80
          end
          object usedqty: TcxGridDBColumn
            Caption = #24050#21344#29992#25968#37327
            DataBinding.FieldName = 'usedqty'
            Options.Editing = False
            Width = 80
          end
          object factqty: TcxGridDBColumn
            Caption = #23454#38469#25968#37327
            DataBinding.FieldName = 'factqty'
            Options.Editing = False
            Width = 80
          end
          object price: TcxGridDBColumn
            Caption = #25104#26412#21333#20215
            DataBinding.FieldName = 'price'
            Options.Editing = False
            Width = 80
          end
          object _quantity: TcxGridDBColumn
            Caption = #24080#38754#25968#37327
            DataBinding.FieldName = 'quantity'
            Options.Editing = False
            Width = 80
          end
          object amount: TcxGridDBColumn
            Caption = #24080#38754#37329#39069
            DataBinding.FieldName = 'amount'
            Options.Editing = False
            Width = 80
          end
          object productdepotcustom1: TcxGridDBColumn
            DataBinding.FieldName = 'custom1'
            Visible = False
            Width = 80
          end
          object productdepotcustom2: TcxGridDBColumn
            DataBinding.FieldName = 'custom2'
            Visible = False
            Width = 80
          end
          object productdepotcustom3: TcxGridDBColumn
            DataBinding.FieldName = 'custom3'
            Visible = False
            Width = 80
          end
          object colLength: TcxGridDBColumn
            Caption = #38271
            DataBinding.FieldName = 'length'
            Visible = False
            Width = 60
          end
          object colWidth: TcxGridDBColumn
            Caption = #23485
            DataBinding.FieldName = 'width'
            Visible = False
            Width = 60
          end
          object colHeight: TcxGridDBColumn
            Caption = #39640
            DataBinding.FieldName = 'Height'
            Visible = False
            Width = 60
          end
        end
        object GrdProductDepotLevel1: TcxGridLevel
          GridView = viewDepot
        end
      end
      object EdtDepotId: TcxDBLookupComboBox
        Tag = 7
        Left = 78
        Top = 13
        DataBinding.DataField = 'depotid'
        DataBinding.DataSource = MainDataSource
        Properties.ListColumns = <>
        TabOrder = 0
        Width = 213
      end
      object dynlblLayid: TcxLabel
        Left = 305
        Top = 15
        Caption = #40664#35748#36135#20301#65306
        Transparent = True
      end
      object dynedtLayid: TcxDBLookupComboBox
        Left = 370
        Top = 13
        DataBinding.DataField = 'layid'
        DataBinding.DataSource = MainDataSource
        Properties.KeyFieldNames = 'id'
        Properties.ListColumns = <
          item
            FieldName = 'code'
          end
          item
            FieldName = 'name'
          end
          item
            FieldName = 'subcode'
          end>
        Properties.ListFieldIndex = 1
        Properties.ListSource = dsSendLay
        TabOrder = 4
        Width = 213
      end
    end
    object tsAssembly: TcxTabSheet
      Caption = #32452#35013#25286#21368
      ImageIndex = 3
      OnShow = tsAssemblyShow
      object GrdProductAssembly: TcxGrid
        Left = 0
        Top = 0
        Width = 868
        Height = 431
        Align = alClient
        PopupMenu = popProductAssembly
        TabOrder = 0
        object viewAssembly: TcxGridDBTableView
          OnMouseDown = viewAssemblyMouseDown
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = DS_ProductAssembly
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.FocusCellOnTab = True
          OptionsBehavior.FocusFirstCellOnNewRecord = True
          OptionsBehavior.GoToNextCellOnEnter = True
          OptionsBehavior.FocusCellOnCycle = True
          OptionsData.Appending = True
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          OptionsView.Indicator = True
          OptionsView.IndicatorWidth = 25
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          OnCustomDrawIndicatorCell = viewUnitCustomDrawIndicatorCell
          object colAssCode: TcxGridDBColumn
            Caption = #36135#21697#32534#30721
            DataBinding.FieldName = 'code'
            Options.Editing = False
            Width = 80
          end
          object assemblyid: TcxGridDBColumn
            Caption = #36135#21697#21517#31216
            DataBinding.FieldName = 'assemblyid'
            PropertiesClassName = 'TcxLookupComboBoxProperties'
            Properties.DropDownAutoSize = True
            Properties.ListColumns = <>
            Width = 151
          end
          object spec: TcxGridDBColumn
            Caption = #35268#26684
            DataBinding.FieldName = 'spec'
            Options.Editing = False
            Width = 242
          end
          object quantity: TcxGridDBColumn
            Caption = #25968#37327
            DataBinding.FieldName = 'quantity'
          end
        end
        object GrdProductAssemblyLevel1: TcxGridLevel
          GridView = viewAssembly
        end
      end
    end
    object tsPlan: TcxTabSheet
      Caption = #35745#21010#20449#24687
      ImageIndex = 4
      object cxLabel3: TcxLabel
        Left = 44
        Top = 29
        Caption = #20027#24448#26469#21333#20301
        Transparent = True
      end
      object cxLabel4: TcxLabel
        Left = 44
        Top = 61
        Caption = #25552#21069#26399'('#22825')'
        Transparent = True
      end
      object EdtAdvanceDays: TcxDBTextEdit
        Left = 123
        Top = 59
        DataBinding.DataField = 'AdvanceDays'
        DataBinding.DataSource = MainDataSource
        TabOrder = 2
        OnKeyPress = EdtValidDatesKeyPress
        Width = 190
      end
      object cxLabel5: TcxLabel
        Left = 32
        Top = 92
        Caption = #26368#23567#35746#36135#25209#37327
        Transparent = True
      end
      object EdtMinPurQty: TcxDBTextEdit
        Left = 123
        Top = 90
        DataBinding.DataField = 'minpurqty'
        DataBinding.DataSource = MainDataSource
        TabOrder = 4
        OnKeyPress = EdtValidDatesKeyPress
        Width = 190
      end
      object cxLabel6: TcxLabel
        Left = 32
        Top = 124
        Caption = #35746#21333#25209#37327#22686#37327
        Transparent = True
      end
      object EdtPurAddQty: TcxDBTextEdit
        Left = 123
        Top = 122
        DataBinding.DataField = 'puraddqty'
        DataBinding.DataSource = MainDataSource
        TabOrder = 6
        OnKeyPress = EdtValidDatesKeyPress
        Width = 190
      end
      object EdtTrader: TcxDBLookupComboBox
        Tag = 19
        Left = 123
        Top = 27
        DataBinding.DataField = 'traderid'
        DataBinding.DataSource = MainDataSource
        Properties.ListColumns = <>
        TabOrder = 0
        Width = 190
      end
      object EdtMrp: TcxDBCheckBox
        Left = 119
        Top = 215
        Caption = #29983#25104'MRP'#24314#35758
        DataBinding.DataField = 'mrp'
        DataBinding.DataSource = MainDataSource
        Properties.NullStyle = nssUnchecked
        TabOrder = 10
      end
      object edtDrp: TcxDBCheckBox
        Left = 119
        Top = 240
        Caption = #29983#25104'DRP'#24314#35758
        DataBinding.DataField = 'drp'
        DataBinding.DataSource = MainDataSource
        Properties.NullStyle = nssUnchecked
        TabOrder = 13
      end
      object dynlblempid: TcxLabel
        Left = 54
        Top = 185
        Caption = #29983#20135#24037#20154
        Transparent = True
      end
      object dynlblworkshopid: TcxLabel
        Left = 56
        Top = 155
        Caption = #29983#20135#36710#38388
        Transparent = True
      end
      object dynedtEmpid: TcxDBLookupComboBox
        Tag = 4
        Left = 123
        Top = 183
        DataBinding.DataField = 'empid'
        DataBinding.DataSource = MainDataSource
        Properties.ListColumns = <>
        TabOrder = 9
        Width = 190
      end
      object dynedtWorkShopid: TcxDBLookupComboBox
        Tag = 70
        Left = 123
        Top = 153
        DataBinding.DataField = 'workshopid'
        DataBinding.DataSource = MainDataSource
        Properties.ListColumns = <>
        TabOrder = 8
        Width = 190
      end
      object dynlblMinDrawQty: TcxLabel
        Left = 32
        Top = 280
        Caption = #26368#23567#39046#26009#25209#37327
        Transparent = True
      end
      object dynedtMinDrawQty: TcxDBTextEdit
        Left = 123
        Top = 278
        DataBinding.DataField = 'mindrawqty'
        DataBinding.DataSource = MainDataSource
        TabOrder = 15
        OnKeyPress = EdtValidDatesKeyPress
        Width = 190
      end
      object chkShareDraw: TcxDBCheckBox
        Left = 319
        Top = 276
        Caption = #20849#32791#21697#39046#26009
        DataBinding.DataField = 'sharedraw'
        DataBinding.DataSource = MainDataSource
        Properties.NullStyle = nssUnchecked
        TabOrder = 16
      end
    end
    object tsPic: TcxTabSheet
      Caption = #22270#29255
      ImageIndex = 6
      OnShow = tsPicShow
      object btnImport: TcxButton
        Left = 512
        Top = 118
        Width = 113
        Height = 25
        Caption = #23548#20837#22270#29255
        TabOrder = 3
        OnClick = btnImportClick
      end
      object btnDelete: TcxButton
        Left = 511
        Top = 160
        Width = 113
        Height = 25
        Caption = #21024#38500
        TabOrder = 4
        OnClick = btnDeleteClick
      end
      object btnExport: TcxButton
        Left = 511
        Top = 203
        Width = 113
        Height = 25
        Caption = #23548#20986
        TabOrder = 6
        OnClick = btnExportClick
      end
      object cxLabel19: TcxLabel
        Left = 512
        Top = 16
        AutoSize = False
        Caption = #24314#35758#65306#20026#20102#36991#20813#24433#21709#31995#32479#24615#33021#65292#35831#19981#35201#20351#29992#36739#22823' (>=2M) '#30340#22270#29255
        Properties.WordWrap = True
        Transparent = True
        Height = 56
        Width = 113
      end
      object lvProPic: TcxListView
        Left = 280
        Top = 0
        Width = 200
        Height = 431
        Align = alLeft
        Columns = <>
        LargeImages = MainDM.imgLstBig
        SmallImages = MainDM.imgList
        TabOrder = 1
        OnClick = lvProPicClick
        OnDblClick = lvProPicDblClick
      end
      object btnDefPic: TcxButton
        Left = 511
        Top = 246
        Width = 113
        Height = 25
        Caption = #40664#35748#22270#29255
        TabOrder = 7
        OnClick = btnDefPicClick
      end
      object btnOtherFile: TcxButton
        Tag = 1
        Left = 512
        Top = 75
        Width = 113
        Height = 25
        Caption = #23548#20837#20854#20182#25991#20214
        TabOrder = 2
        OnClick = btnImportClick
      end
      object imgProduct: TcxDBImage
        Left = 0
        Top = 0
        Align = alLeft
        DataBinding.DataField = 'pic'
        DataBinding.DataSource = DS_ProductPic
        Properties.GraphicClassName = 'TdxPNGImage'
        TabOrder = 0
        OnDblClick = imgProductDblClick
        Height = 431
        Width = 280
      end
    end
    object tsCustKind: TcxTabSheet
      Caption = #33258#23450#20041#31867#22411#20851#32852
      ImageIndex = 7
      OnShow = tsCustKindShow
      object grdCustKind: TcxGrid
        Left = 0
        Top = 0
        Width = 300
        Height = 431
        Hint = #21452#20987' '#36873#39033#21517#31216' '#21363#21487#28155#21152
        Align = alLeft
        TabOrder = 0
        object viewCustKind: TcxGridDBTableView
          PopupMenu = poptt_book
          Navigator.Buttons.CustomButtons = <>
          DataController.DataSource = dsCustKind
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsView.NoDataToDisplayInfoText = '<'#21452#20987' '#36873#39033#21517#31216' '#21363#21487#28155#21152'>'
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          OptionsView.Indicator = True
          OptionsView.IndicatorWidth = 25
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          OnCustomDrawIndicatorCell = viewUnitCustomDrawIndicatorCell
          object viewCustKindColumn1: TcxGridDBColumn
            Caption = #31867#21035
            DataBinding.FieldName = 'kindname'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 60
          end
          object viewCustKindColumn2: TcxGridDBColumn
            Caption = #21517#31216
            DataBinding.FieldName = 'kname'
            HeaderAlignmentHorz = taCenter
            Options.Editing = False
            Width = 80
          end
          object viewCustKindColumn3: TcxGridDBColumn
            Caption = #32534#30721
            DataBinding.FieldName = 'kcode'
            HeaderAlignmentHorz = taCenter
            Width = 60
          end
        end
        object lvlCustKind: TcxGridLevel
          GridView = viewCustKind
        end
      end
      object cxSplitter1: TcxSplitter
        Left = 300
        Top = 0
        Width = 8
        Height = 431
        HotZoneClassName = 'TcxSimpleStyle'
        Control = grdCustKind
      end
      object pnlKind: TPanel
        Left = 308
        Top = 0
        Width = 560
        Height = 431
        Align = alClient
        BevelOuter = bvNone
        Caption = 'pnlKind'
        TabOrder = 2
        object Label1: TLabel
          Left = 3
          Top = 54
          Width = 60
          Height = 12
          Caption = #36873#39033#31867#21035#65306
        end
        object cbbKind: TcxComboBox
          Left = 73
          Top = 50
          Properties.DropDownListStyle = lsEditFixedList
          Properties.DropDownSizeable = True
          Properties.ImmediatePost = True
          Properties.OnValidate = cbbKindPropertiesValidate
          TabOrder = 0
          Width = 310
        end
        object grdKind: TcxGrid
          Left = 0
          Top = 108
          Width = 560
          Height = 323
          Hint = #21452#20987#31867#22411#35774#32622#36135#21697#20851#32852
          Align = alBottom
          Anchors = [akLeft, akTop, akRight, akBottom]
          TabOrder = 1
          object viewKind: TcxGridDBTableView
            Navigator.Buttons.CustomButtons = <>
            OnCellClick = viewKindCellClick
            DataController.DataSource = dsKind
            DataController.Summary.DefaultGroupSummaryItems = <>
            DataController.Summary.FooterSummaryItems = <>
            DataController.Summary.SummaryGroups = <>
            OptionsData.Inserting = False
            OptionsView.NoDataToDisplayInfoText = '<'#35831#20808#36873#25321' '#36873#39033#31867#21035' >'
            OptionsView.ColumnAutoWidth = True
            OptionsView.GroupByBox = False
            OptionsView.Indicator = True
            OptionsView.IndicatorWidth = 25
            Styles.Background = MainDM.bslBackGroup
            Styles.ContentEven = MainDM.bsEven
            Styles.ContentOdd = MainDM.bsOdd
            Styles.Header = MainDM.bsTitle
            Styles.Selection = MainDM.bsSelect
            OnCustomDrawIndicatorCell = viewUnitCustomDrawIndicatorCell
            object colKname: TcxGridDBColumn
              Caption = #36873#39033#21517#31216
              DataBinding.FieldName = 'kname'
              HeaderAlignmentHorz = taCenter
              Width = 100
            end
            object colKCode: TcxGridDBColumn
              Caption = #32534#30721
              DataBinding.FieldName = 'kcode'
              HeaderAlignmentHorz = taCenter
              Width = 60
            end
            object colKindAppend: TcxGridDBColumn
              Caption = #28857#20987#28155#21152
              DataBinding.FieldName = 'appendkind'
              PropertiesClassName = 'TcxTextEditProperties'
              Properties.Alignment.Horz = taCenter
              HeaderAlignmentHorz = taCenter
              Options.Editing = False
              Width = 60
            end
          end
          object lvlKind: TcxGridLevel
            GridView = viewKind
          end
        end
        object Rad_Type: TRadioGroup
          Left = 3
          Top = 5
          Width = 380
          Height = 33
          Columns = 2
          ItemIndex = 0
          Items.Strings = (
            #29992#25143#33258#23450#31867#22411
            #31995#32479#31867#22411)
          TabOrder = 2
          OnClick = Rad_TypeClick
        end
        object btnNewKind: TcxButton
          Left = 233
          Top = 79
          Width = 70
          Height = 25
          Caption = #26032#22686#39033#30446
          TabOrder = 3
          OnClick = btnNewKindClick
        end
        object edtFilter: TcxTextEdit
          Left = 0
          Top = 80
          TabOrder = 4
          Width = 121
        end
        object btnKindFilter: TcxButton
          Left = 125
          Top = 79
          Width = 75
          Height = 25
          Caption = #26597#25214
          TabOrder = 5
          OnClick = btnKindFilterClick
        end
        object btnCancelKind: TcxButton
          Left = 313
          Top = 79
          Width = 70
          Height = 25
          Caption = #21462#28040
          Enabled = False
          TabOrder = 6
          OnClick = btnCancelKindClick
        end
      end
    end
  end
  object cxGroupBox1: TcxGroupBox [5]
    Left = 5
    Top = 488
    Anchors = [akLeft, akRight, akBottom]
    Style.BorderStyle = ebsUltraFlat
    TabOrder = 3
    DesignSize = (
      894
      44)
    Height = 44
    Width = 894
    object ChkPause: TcxDBCheckBox
      Left = 21
      Top = 17
      Caption = #20572#29992#26631#24535
      DataBinding.DataField = 'pause'
      DataBinding.DataSource = MainDataSource
      Properties.NullStyle = nssUnchecked
      TabOrder = 0
      Transparent = True
    end
    object ChkAssembly: TcxDBCheckBox
      Left = 325
      Top = 17
      Caption = #21487#32452#35013'/'#25286#21368
      DataBinding.DataField = 'assembly'
      DataBinding.DataSource = MainDataSource
      Properties.NullStyle = nssUnchecked
      TabOrder = 2
      Transparent = True
      OnClick = ChkAssemblyClick
    end
    object btnBOM: TcxButton
      Left = 780
      Top = 11
      Width = 100
      Height = 28
      Anchors = [akTop, akRight]
      Caption = #21019#24314#29289#26009#28165#21333
      TabOrder = 3
      Visible = False
      OnClick = btnBOMClick
    end
    object chkCopy: TcxCheckBox
      Left = 173
      Top = 17
      Caption = #22797#21046#36135#21697
      Properties.ImmediatePost = True
      TabOrder = 1
      Transparent = True
    end
    object cxLabel7: TcxLabel
      Left = 11
      Top = -2
      Caption = #20572#29992#21069#35831#37325#31639#25104#26412#65292#20445#35777#24211#23384#20934#30830
      ParentColor = False
      ParentFont = False
      Style.Color = clBtnFace
      Style.Font.Charset = GB2312_CHARSET
      Style.Font.Color = clBlue
      Style.Font.Height = -12
      Style.Font.Name = #23435#20307
      Style.Font.Style = []
      Style.IsFontAssigned = True
    end
  end
  inherited pnlBottom: TPanel
    Top = 534
    Width = 902
    TabOrder = 6
    ExplicitTop = 534
    ExplicitWidth = 902
    DesignSize = (
      902
      60)
    inherited Bevel1: TBevel
      Width = 902
      ExplicitWidth = 712
    end
    inherited btnOK: TBitBtn
      Left = 709
      Top = 19
      ExplicitLeft = 709
      ExplicitTop = 19
    end
    inherited btnCancel: TBitBtn
      Left = 804
      Top = 19
      ExplicitLeft = 804
      ExplicitTop = 19
    end
    inherited btnContinue: TBitBtn
      Top = 19
      ExplicitTop = 19
    end
    inherited btnPri: TBitBtn
      Top = 19
      ExplicitTop = 19
    end
    inherited btnNext: TBitBtn
      Top = 19
      ExplicitTop = 19
    end
    inherited btnBaseEditSave: TBitBtn
      Top = 19
      ExplicitTop = 19
    end
  end
  inherited btnPrint: TcxButton
    Left = 670
    Top = 5
    ExplicitLeft = 670
    ExplicitTop = 5
  end
  inherited edtPrint: TcxLookupComboBox
    Left = 771
    Top = 7
    ExplicitLeft = 771
    ExplicitTop = 7
  end
  object Qry_ProductType: TUniQuery [9]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_ProductType')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 95
    Top = 298
  end
  object DS_ProductType: TDataSource [10]
    DataSet = Qry_ProductType
    Left = 95
    Top = 329
  end
  object Qry_ProductAssembly: TUniQuery [11]
    SQLInsert.Strings = (
      'INSERT INTO td_productassembly'
      '  (productid, assemblyid, quantity)'
      'VALUES'
      '  (:productid, :assemblyid, :quantity)')
    SQLDelete.Strings = (
      'DELETE FROM td_productassembly'
      'WHERE'
      '  productid = :Old_productid AND assemblyid = :Old_assemblyid')
    SQLUpdate.Strings = (
      'UPDATE td_productassembly'
      'SET'
      
        '  productid = :productid, assemblyid = :assemblyid, quantity = :' +
        'quantity'
      'WHERE'
      '  productid = :Old_productid AND assemblyid = :Old_assemblyid')
    SQLLock.Strings = (
      'SELECT * FROM td_productassembly'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      '  productid = :Old_productid AND assemblyid = :Old_assemblyid')
    SQLRefresh.Strings = (
      'SELECT productid, assemblyid, quantity FROM td_productassembly'
      'WHERE'
      '  productid = :Old_productid AND assemblyid = :Old_assemblyid')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select a.productid, a.assemblyid, a.quantity, p.spec, p.code'
      
        '  from td_productassembly a, td_product p where p.p_id=a.assembl' +
        'yid and 1=2')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    OnNewRecord = Qry_ProductAssemblyNewRecord
    Left = 384
    Top = 58
    object Qry_ProductAssemblyproductid: TIntegerField
      FieldName = 'productid'
    end
    object Qry_ProductAssemblyassemblyid: TAutoIncField
      FieldName = 'assemblyid'
      OnChange = Qry_ProductAssemblyassemblyidChange
    end
    object Qry_ProductAssemblyquantity: TFloatField
      FieldName = 'quantity'
    end
    object Qry_ProductAssemblyspec: TWideStringField
      FieldName = 'spec'
      Size = 60
    end
    object Qry_ProductAssemblycode: TStringField
      FieldName = 'code'
      Size = 40
    end
  end
  object DS_ProductAssembly: TDataSource [12]
    DataSet = Qry_ProductAssembly
    Left = 380
    Top = 120
  end
  object popProductAssembly: TPopupMenu [13]
    Left = 376
    Top = 168
    object mItemAppend: TMenuItem
      Caption = #26032#22686#26126#32454
      OnClick = mItemAppendClick
    end
    object mitemAssembly: TMenuItem
      Caption = #21024#38500#26126#32454
      OnClick = mitemAssemblyClick
    end
  end
  object Qry_UnitPrice: TUniQuery [14]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_unitprice where 1=2 order by productid, u_no')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    BeforeInsert = Qry_UnitPriceBeforeInsert
    BeforePost = Qry_UnitPriceBeforePost
    OnNewRecord = Qry_UnitPriceNewRecord
    Left = 139
    Top = 257
    object Qry_UnitPriceproductid: TIntegerField
      FieldName = 'productid'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceunitid: TIntegerField
      FieldName = 'unitid'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object Qry_UnitPriceu_no: TIntegerField
      FieldName = 'u_no'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceunitname: TWideStringField
      FieldName = 'unitname'
      ProviderFlags = [pfInUpdate]
      Size = 30
    end
    object Qry_UnitPricebarcode: TWideStringField
      FieldName = 'barcode'
      ProviderFlags = [pfInUpdate]
      Size = 30
    end
    object Qry_UnitPricewtcode: TWideStringField
      FieldName = 'wtcode'
      ProviderFlags = [pfInUpdate]
      Size = 30
    end
    object Qry_UnitPricerate: TFloatField
      FieldName = 'rate'
      ProviderFlags = [pfInUpdate]
      DisplayFormat = '#0.########'
    end
    object Qry_UnitPricebaseunit: TBooleanField
      FieldName = 'baseunit'
      ProviderFlags = [pfInUpdate]
      OnChange = Qry_UnitPricebaseunitChange
    end
    object Qry_UnitPricesalereprice: TFloatField
      FieldName = 'salereprice'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPricepurreprice: TFloatField
      FieldName = 'purreprice'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPricepurtopprice: TFloatField
      FieldName = 'purtopprice'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPricesalelowprice: TFloatField
      FieldName = 'salelowprice'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPricevipprice: TFloatField
      FieldName = 'vipprice'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceprice1: TFloatField
      FieldName = 'price1'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceprice2: TFloatField
      FieldName = 'price2'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceprice3: TFloatField
      FieldName = 'price3'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceprice4: TFloatField
      FieldName = 'price4'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPriceprice5: TFloatField
      FieldName = 'price5'
      ProviderFlags = [pfInUpdate]
    end
    object Qry_UnitPricesale: TBooleanField
      FieldName = 'sale'
      ProviderFlags = [pfInUpdate]
      OnChange = Qry_UnitPricesaleChange
    end
    object Qry_UnitPricepur: TBooleanField
      FieldName = 'pur'
      ProviderFlags = [pfInUpdate]
      OnChange = Qry_UnitPricesaleChange
    end
    object Qry_UnitPricedepot: TBooleanField
      FieldName = 'depot'
      ProviderFlags = [pfInUpdate]
      OnChange = Qry_UnitPricesaleChange
    end
    object Qry_UnitPricefixrate: TBooleanField
      FieldName = 'fixrate'
    end
  end
  object DS_UnitPirce: TDataSource [15]
    DataSet = Qry_UnitPrice
    Left = 132
    Top = 295
  end
  object popUnitPrice: TPopupMenu [16]
    Left = 142
    Top = 329
    object mitemAppendUnitPrice: TMenuItem
      Caption = #26032#22686#21333#20301
      OnClick = mitemAppendUnitPriceClick
    end
    object N1: TMenuItem
      Caption = '-'
    end
    object mitemUnitPrice: TMenuItem
      Caption = #21024#38500#21333#20301
      OnClick = mitemUnitPriceClick
    end
  end
  object dsDS_book: TDataSource [17]
    DataSet = qry_book
    Left = 286
    Top = 229
  end
  object poptt_book: TPopupMenu [18]
    Left = 316
    Top = 325
    object mItemDepot: TMenuItem
      Caption = #21024#38500#26126#32454
      OnClick = mItemDepotClick
    end
  end
  object qry_book: TUniQuery [19]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select  *  from tt_book   where 1=2')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    OnNewRecord = qry_bookNewRecord
    Left = 248
    Top = 190
    object qry_bookDepotId: TIntegerField
      FieldName = 'DepotId'
    end
    object qry_book_DepotName: TStringField
      FieldKind = fkLookup
      FieldName = '_DepotName'
      LookupDataSet = Qry_Depot
      LookupKeyFields = 'depotid'
      LookupResultField = 'name'
      KeyFields = 'DepotId'
      Lookup = True
    end
    object qry_bookproductid: TIntegerField
      FieldName = 'productid'
    end
    object qry_bookstate: TBooleanField
      FieldName = 'state'
    end
    object qry_bookcustom1: TStringField
      FieldName = 'custom1'
      Size = 200
    end
    object qry_bookcustom2: TStringField
      FieldName = 'custom2'
      Size = 200
    end
    object qry_bookcustom3: TStringField
      FieldName = 'custom3'
      Size = 200
    end
    object qry_bookbeginassqty: TFloatField
      FieldName = 'beginassqty'
    end
    object qry_bookfactassqty: TFloatField
      FieldName = 'factassqty'
    end
    object qry_bookbeginprice: TFloatField
      FieldName = 'beginprice'
    end
    object qry_bookbeginqty: TFloatField
      FieldName = 'beginqty'
    end
    object qry_bookbeginamt: TFloatField
      FieldName = 'beginamt'
    end
    object qry_bookusedqty: TFloatField
      FieldName = 'usedqty'
    end
    object qry_booklowqty: TFloatField
      FieldName = 'lowqty'
    end
    object qry_booktopqty: TFloatField
      FieldName = 'topqty'
    end
    object qry_bookquantity: TFloatField
      FieldName = 'quantity'
    end
    object qry_bookprice: TFloatField
      FieldName = 'price'
    end
    object qry_bookamount: TFloatField
      FieldName = 'amount'
    end
    object qry_bookfactqty: TFloatField
      FieldName = 'factqty'
    end
    object qry_bookassqty: TFloatField
      FieldName = 'assqty'
    end
    object qry_booklength: TFloatField
      FieldName = 'length'
    end
    object qry_bookwidth: TFloatField
      FieldName = 'width'
    end
    object qry_bookHeight: TFloatField
      FieldName = 'Height'
    end
  end
  object Qry_Depot: TUniQuery [20]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_depot')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    Left = 231
    Top = 291
  end
  object DS_Depot: TDataSource [21]
    DataSet = Qry_Depot
    Left = 227
    Top = 332
  end
  object Qry_ProductPic: TUniQuery [22]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select  id,productid, pic from  td_productpic  where 1=2')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    OnNewRecord = Qry_ProductPicNewRecord
    Left = 408
    Top = 220
    object Qry_ProductPicid: TIntegerField
      FieldName = 'id'
    end
    object Qry_ProductPicproductid: TIntegerField
      FieldName = 'productid'
    end
    object Qry_ProductPicpic: TBlobField
      FieldName = 'pic'
    end
    object Qry_ProductPicname: TStringField
      FieldName = 'name'
      Size = 50
    end
    object Qry_ProductPicdefpic: TBooleanField
      FieldName = 'defpic'
    end
    object Qry_ProductPicispic: TBooleanField
      FieldName = 'ispic'
    end
    object Qry_ProductPicpostfix: TStringField
      FieldName = 'postfix'
      Size = 10
    end
  end
  object DS_ProductPic: TDataSource [23]
    DataSet = Qry_ProductPic
    Left = 408
    Top = 268
  end
  object SavePicDlg: TSaveDialog [24]
    Filter = #22270#29255#25991#20214'(*.bmp)|*.bmp|'#22270#29255#25991#20214'(*.jpg)|*.jpg|'#20854#20182#25991#20214'(*.*)|*.*'
    Left = 479
    Top = 267
  end
  object Qry_AssUnit: TUniQuery [25]
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_unitprice where 1=2 ')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    Left = 139
    Top = 214
  end
  object OpenPicDlg: TOpenPictureDialog [26]
    Filter = 
      'All (*.gif;*.png;*.jpg;*.jpeg;*.bmp;*.ico;*.emf;*.wmf,*.dwg,*.dw' +
      'f)|*.gif;*.png;*.jpg;*.jpeg;*.bmp;*.ico;*.emf;*.wmf,*.dwg,*.dwf|' +
      'CompuServe GIF Image (*.gif)|*.gif|PNG graphics from DevExpress ' +
      '(*.png)|*.png|JPEG Image File (*.jpg)|*.jpg|JPEG Image File (*.j' +
      'peg)|*.jpeg|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced M' +
      'etafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|AutoCAD(*.dwg)|*.' +
      'dwg|AutoCAD(*.dwf)|*.dwf|ALL FILE|*.*'
    Left = 475
    Top = 118
  end
  inherited MainDataSource: TDataSource
    DataSet = MainDataSet
    Left = 94
    Top = 247
  end
  inherited qryDynDtl: TUniQuery
    Connection = nil
    Left = 28
    Top = 60
  end
  object MainDataSet: TUniQuery
    SQLInsert.Strings = (
      'Insert into TD_PRODUCT(p_id,'
      'code,'
      'name,'
      'abname,'
      'spec,'
      'producttypeid,'
      'producttrademarkid,'
      'depotkindid,'
      'depotid,'
      'layid,'
      'kind,'
      'cprice,'
      'quantity,'
      'factqty,'
      'assqty,'
      'factassqty,'
      'calccost,'
      'validdates,'
      'assembly,'
      'custom1,'
      'custom2,'
      'custom3,'
      'custom4,'
      'custom5,'
      'custom6,'
      'custom7,'
      'custom8,'
      'custom9,'
      'custom10,'
      'posyear,'
      'posmonth,'
      'tag,'
      'puraddqty,'
      'mrp,'
      'advancedays,'
      'traderid,'
      'minpurqty,'
      'pause,'
      'batch,'
      'custom11,'
      'custom12,'
      'custom13,'
      'custom14,'
      'custom15,'
      'drp,'
      'empid,'
      'workshopid,'
      'warndays,'
      'share,'
      'imei,'
      'length,'
      'width,'
      'height,'
      'specificweight,'
      'scorerate,'
      'scoreexch,'
      'sharedraw,'
      'mindrawqty'
      ')'
      'Values'
      '(:p_id,'
      ':code,'
      ':name,'
      ':abname,'
      ':spec,'
      ':producttypeid,'
      ':producttrademarkid,'
      ':depotkindid,'
      ':depotid,'
      ':layid,'
      ':kind,'
      ':cprice,'
      ':quantity,'
      ':factqty,'
      ':assqty,'
      ':factassqty,'
      ':calccost,'
      ':validdates,'
      ':assembly,'
      ':custom1,'
      ':custom2,'
      ':custom3,'
      ':custom4,'
      ':custom5,'
      ':custom6,'
      ':custom7,'
      ':custom8,'
      ':custom9,'
      ':custom10,'
      ':posyear,'
      ':posmonth,'
      ':tag,'
      ':puraddqty,'
      ':mrp,'
      ':advancedays,'
      ':traderid,'
      ':minpurqty,'
      ':pause,'
      ':batch,'
      ':custom11,'
      ':custom12,'
      ':custom13,'
      ':custom14,'
      ':custom15,'
      ':drp,'
      ':empid,'
      ':workshopid,'
      ':warndays,'
      ':share,'
      ':imei,'
      ':length,'
      ':width,'
      ':height,'
      ':specificweight,'
      ':scorerate,'
      ':scoreexch,'
      ':sharedraw,'
      ':mindrawqty'
      ')')
    SQLDelete.Strings = (
      'Delete from TD_PRODUCT where p_id=:OLD_p_id')
    SQLUpdate.Strings = (
      'Update TD_PRODUCT set '
      'p_id=:p_id,'
      'code=:code,'
      'name=:name,'
      'abname=:abname,'
      'spec=:spec,'
      'producttypeid=:producttypeid,'
      'producttrademarkid=:producttrademarkid,'
      'depotkindid=:depotkindid,'
      'depotid=:depotid,'
      'layid=:layid,'
      'kind=:kind,'
      'cprice=:cprice,'
      'quantity=:quantity,'
      'factqty=:factqty,'
      'assqty=:assqty,'
      'factassqty=:factassqty,'
      'calccost=:calccost,'
      'validdates=:validdates,'
      'assembly=:assembly,'
      'custom1=:custom1,'
      'custom2=:custom2,'
      'custom3=:custom3,'
      'custom4=:custom4,'
      'custom5=:custom5,'
      'custom6=:custom6,'
      'custom7=:custom7,'
      'custom8=:custom8,'
      'custom9=:custom9,'
      'custom10=:custom10,'
      'posyear=:posyear,'
      'posmonth=:posmonth,'
      'tag=:tag,'
      'puraddqty=:puraddqty,'
      'mrp=:mrp,'
      'advancedays=:advancedays,'
      'traderid=:traderid,'
      'minpurqty=:minpurqty,'
      'pause=:pause,'
      'batch=:batch,'
      'custom11=:custom11,'
      'custom12=:custom12,'
      'custom13=:custom13,'
      'custom14=:custom14,'
      'custom15=:custom15,'
      'drp=:drp,'
      'empid=:empid,'
      'workshopid=:workshopid,'
      'warndays=:warndays,'
      'share=:share,'
      'imei=:imei,'
      'length=:length,'
      'width=:width,'
      'height=:height,'
      'specificweight=:specificweight,'
      'scorerate=:scorerate,'
      'scoreexch=:scoreexch,'
      'sharedraw=:sharedraw,'
      'mindrawqty=:mindrawqty'
      ' where p_id=:OLD_p_id')
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select  *  from v_td_product where 1=2')
    CachedUpdates = True
    Options.PrepareUpdateSQL = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Options.AutoPrepare = True
    AfterScroll = MainDataSetAfterScroll
    Left = 96
    Top = 202
    object MainDataSetp_id: TIntegerField
      FieldName = 'p_id'
    end
    object MainDataSetcode: TStringField
      FieldName = 'code'
      Size = 30
    end
    object MainDataSetname: TWideStringField
      FieldName = 'name'
      Required = True
      Size = 60
    end
    object MainDataSetabname: TWideStringField
      FieldName = 'abname'
      Size = 60
    end
    object MainDataSetspec: TWideStringField
      FieldName = 'spec'
      Size = 60
    end
    object MainDataSetproducttypeid: TIntegerField
      FieldName = 'producttypeid'
    end
    object MainDataSetdepotkindid: TIntegerField
      FieldName = 'depotkindid'
    end
    object MainDataSetdepotid: TIntegerField
      FieldName = 'depotid'
    end
    object MainDataSetlayid: TIntegerField
      FieldName = 'layid'
    end
    object MainDataSetkind: TIntegerField
      FieldName = 'kind'
    end
    object MainDataSetcprice: TFloatField
      FieldName = 'cprice'
    end
    object MainDataSetquantity: TFloatField
      FieldName = 'quantity'
    end
    object MainDataSetfactqty: TFloatField
      FieldName = 'factqty'
    end
    object MainDataSetassqty: TFloatField
      FieldName = 'assqty'
    end
    object MainDataSetfactassqty: TFloatField
      FieldName = 'factassqty'
    end
    object MainDataSetcalccost: TByteField
      FieldName = 'calccost'
    end
    object MainDataSetvaliddates: TIntegerField
      FieldName = 'validdates'
    end
    object MainDataSetassembly: TBooleanField
      FieldName = 'assembly'
    end
    object MainDataSetcustom1: TStringField
      FieldName = 'custom1'
      Size = 100
    end
    object MainDataSetcustom2: TStringField
      FieldName = 'custom2'
      Size = 100
    end
    object MainDataSetcustom3: TStringField
      FieldName = 'custom3'
      Size = 100
    end
    object MainDataSetcustom4: TStringField
      FieldName = 'custom4'
      Size = 100
    end
    object MainDataSetcustom5: TStringField
      FieldName = 'custom5'
      Size = 100
    end
    object MainDataSetcustom6: TStringField
      FieldName = 'custom6'
      Size = 100
    end
    object MainDataSetcustom7: TStringField
      FieldName = 'custom7'
      Size = 100
    end
    object MainDataSetcustom8: TStringField
      FieldName = 'custom8'
      Size = 100
    end
    object MainDataSetcustom9: TStringField
      FieldName = 'custom9'
      Size = 100
    end
    object MainDataSetcustom10: TStringField
      FieldName = 'custom10'
      Size = 100
    end
    object MainDataSetcustom11: TFloatField
      FieldName = 'custom11'
    end
    object MainDataSetcustom12: TFloatField
      FieldName = 'custom12'
    end
    object MainDataSetcustom13: TFloatField
      FieldName = 'custom13'
    end
    object MainDataSetcustom14: TFloatField
      FieldName = 'custom14'
    end
    object MainDataSetcustom15: TFloatField
      FieldName = 'custom15'
    end
    object MainDataSetposyear: TIntegerField
      FieldName = 'posyear'
    end
    object MainDataSetposmonth: TIntegerField
      FieldName = 'posmonth'
    end
    object MainDataSettag: TBooleanField
      FieldName = 'tag'
    end
    object MainDataSetpuraddqty: TFloatField
      FieldName = 'puraddqty'
    end
    object MainDataSetmrp: TBooleanField
      FieldName = 'mrp'
    end
    object MainDataSetadvancedays: TIntegerField
      FieldName = 'advancedays'
    end
    object MainDataSettraderid: TIntegerField
      FieldName = 'traderid'
    end
    object MainDataSetminpurqty: TFloatField
      FieldName = 'minpurqty'
    end
    object MainDataSetpause: TBooleanField
      FieldName = 'pause'
    end
    object MainDataSetbatch: TBooleanField
      FieldName = 'batch'
    end
    object MainDataSetunitid: TIntegerField
      FieldName = 'unitid'
    end
    object MainDataSetpurreprice: TFloatField
      FieldName = 'purreprice'
    end
    object MainDataSetsalereprice: TFloatField
      FieldName = 'salereprice'
    end
    object MainDataSetbarcode: TWideStringField
      FieldName = 'barcode'
      Size = 30
    end
    object MainDataSetwtcode: TWideStringField
      FieldName = 'wtcode'
      Size = 30
    end
    object MainDataSetpurtopprice: TFloatField
      FieldName = 'purtopprice'
    end
    object MainDataSetsalelowprice: TFloatField
      FieldName = 'salelowprice'
    end
    object MainDataSetvipprice: TFloatField
      FieldName = 'vipprice'
    end
    object MainDataSetprice1: TFloatField
      FieldName = 'price1'
    end
    object MainDataSetprice2: TFloatField
      FieldName = 'price2'
    end
    object MainDataSetprice3: TFloatField
      FieldName = 'price3'
    end
    object MainDataSetprice4: TFloatField
      FieldName = 'price4'
    end
    object MainDataSetprice5: TFloatField
      FieldName = 'price5'
    end
    object MainDataSetproducttypename: TWideStringField
      FieldName = 'producttypename'
      Size = 60
    end
    object MainDataSetdepotkindname: TStringField
      FieldName = 'depotkindname'
      Size = 60
    end
    object MainDataSetcalccostname: TStringField
      FieldName = 'calccostname'
      Size = 18
    end
    object MainDataSetkindname: TStringField
      FieldName = 'kindname'
      Size = 50
    end
    object MainDataSetdrp: TBooleanField
      FieldName = 'drp'
    end
    object MainDataSetempid: TIntegerField
      FieldName = 'empid'
    end
    object MainDataSetworkshopid: TIntegerField
      FieldName = 'workshopid'
    end
    object MainDataSetwarndays: TIntegerField
      FieldName = 'warndays'
    end
    object MainDataSetproducttrademarkid: TIntegerField
      FieldName = 'producttrademarkid'
    end
    object MainDataSetdepotname: TWideStringField
      DisplayLabel = #40664#35748#20179#24211
      FieldName = 'depotname'
      ProviderFlags = []
      Size = 60
    end
    object MainDataSetimei: TBooleanField
      FieldName = 'imei'
    end
    object MainDataSetlength: TBooleanField
      FieldName = 'length'
    end
    object MainDataSetwidth: TBooleanField
      FieldName = 'width'
    end
    object MainDataSetheight: TBooleanField
      FieldName = 'height'
    end
    object MainDataSetspecificweight: TFloatField
      FieldName = 'specificweight'
    end
    object MainDataSetscorerate: TFloatField
      FieldName = 'scorerate'
    end
    object MainDataSetscoreexch: TFloatField
      FieldName = 'scoreexch'
    end
    object MainDataSetsharedraw: TBooleanField
      FieldName = 'sharedraw'
    end
    object MainDataSetmindrawqty: TFloatField
      FieldName = 'mindrawqty'
    end
  end
  object qrySendLay: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      ''
      'select a.id,a.name,a.code,a.depotid,a.subcode'
      '  from td_lay a'
      '  left join tt_booklay b on b.layid=a.id and b.depotid=a.depotid'
      '  where (len(a.subcode)>2) '
      
        '    and (select count(*) from td_lay l where l.subcode like a.su' +
        'bcode+'#39'%'#39')=1'
      '  group by a.id,a.name,a.code,a.depotid,a.subcode')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 570
    Top = 16
  end
  object dspSendLay: TDataSetProvider
    DataSet = qrySendLay
    Left = 576
    Top = 51
  end
  object cdsSendLay: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'depotid'
        ParamType = ptInput
        Value = 0
      end>
    ProviderName = 'dspSendLay'
    Left = 576
    Top = 91
  end
  object dsSendLay: TDataSource
    DataSet = cdsSendLay
    Left = 584
    Top = 123
  end
  object dsCustKind: TDataSource
    DataSet = qryCustKind
    Left = 191
    Top = 86
  end
  object qryCustKind: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select * from td_custkind where typeid=10 order by kind,kcode')
    CachedUpdates = True
    OnNewRecord = qryCustKindNewRecord
    Left = 135
    Top = 74
  end
  object dsKind: TDataSource
    DataSet = qryKind
    Left = 595
    Top = 238
  end
  object qryKind: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      'select *, '#39#28155#21152#39' as appendkind from ts_kind')
    Options.SetFieldsReadOnly = False
    Left = 595
    Top = 186
  end
end
